﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;

namespace Excell_On_Services.ViewModels
{
    public class ClientModel
    {
        [HiddenInput(DisplayValue = false)]
        public Guid ClientID { get; set; }

        [Required(ErrorMessage="Username is required")]
        public string Username { get; set; }

        [Required(ErrorMessage = "Company name is required")]
        [DisplayName("Company Name")]
        public string CompanyName { get; set; }
        
        [Required(ErrorMessage = "Address is required")]
        public string Address { get; set; }

        //[DataType(DataType.EmailAddress,ErrorMessage="Not a valid email")]
        [RegularExpression(@"^(([A-Za-z0-9]+_+)|([A-Za-z0-9]+\-+)|([A-Za-z0-9]+\.+)|([A-Za-z0-9]+\++))*[A-Za-z0-9]+@((\w+\-+)|(\w+\.))*\w{1,63}\.[a-zA-Z]{2,6}$", ErrorMessage = "Invalid Email Address")]
        [Required(ErrorMessage = "Email is required")]
        public string Email { get; set; }
        
        [Required(ErrorMessage = "Phone is required")]
        [DataType(DataType.PhoneNumber)]
        public string Phone {get;set;}

        [DataType(DataType.MultilineText)]
        [DisplayName("Product Description")]
        public string ProductDescription { get; set; }

        [DataType(DataType.MultilineText)]
        [DisplayName("Company Description")]
        public string Description { get; set; }

        [DisplayName("Lock the client")]
        public bool IsLock { get; set; }

        public bool IsStatus { get; set; }

    }
}